<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // 路由梳理
      const router = new VueRouter({
        routes: [
          { path: "/login", component: Login组件 },
          { path: "/404", component: notFound组件 },
          {
            path: "/",
            redirect: '/dashboard',
            component: Layout架子组件,
            children: [
              { path: "/dashboard", component: 首页组件 },
              { path: "/departments", component: 组织架构组件 },
              // 我们做的是权限系统, 假设用户没有 员工页面的权限,那么这个用户关于员工的所有页面都是不能看的
              // 我们就要考虑从路由规则中移除关于员工的相关路由规则， 以上方式去控制路由规则显示与否，不太灵活
              { path: "/employees", component: 員工组件 },
              { path: "/employees/details", component: 員工詳情组件 },
              { path: "/employees/import", component: 員工导入组件 },
              { path: "/employees/adjustPost", component: 員工调岗组件 },
              { path: "/employees/leave", component: 員工离职组件 },

              { path: "/settings", component: 公司设置组件 },
              { path: "/permissions", component: 权限设置组件 },
              { path: "/social", component: 社保组件 },
              { path: "/attendances", component: 考勤组件 },
              { path: "/salarys", component: 工资组件 },
              { path: "/approvals", component: 审批组件 },
            ],
          },
        ],
      });
    </script>
  </body>
</html>
